/*    */ package com.ui;
/*    */ 
/*    */ import java.awt.BorderLayout;
/*    */ import java.awt.Container;
/*    */ import java.awt.Dimension;
/*    */ import java.awt.Toolkit;
/*    */ import javax.swing.JFrame;
/*    */ import javax.swing.JLabel;
/*    */ import javax.swing.JPanel;
/*    */ import javax.swing.SwingUtilities;
/*    */ import javax.swing.UnsupportedLookAndFeelException;
/*    */ 
/*    */ public class Demo extends JFrame
/*    */ {
/*    */   private static final long serialVersionUID = 1L;
/*    */   private static Demo app;
/*    */ 
/*    */   public Demo()
/*    */     throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException
/*    */   {
/* 23 */     setTitle("Demo...");
/* 24 */     JLabel lbl = new JLabel("Demo.. Please contact our technical support.");
/* 25 */     lbl.setHorizontalAlignment(0);
/* 26 */     lbl.setOpaque(true);
/* 27 */     Container cnt = getContentPane();
/* 28 */     cnt.setLayout(new BorderLayout());
/* 29 */     JPanel pane = new JPanel();
/* 30 */     pane.setLayout(new BorderLayout());
/* 31 */     pane.add(lbl);
/* 32 */     cnt.add(pane, "Center");
/* 33 */     setUndecorated(true);
/* 34 */     setDefaultCloseOperation(2);
/* 35 */     setPreferredSize(new Dimension(300, 80));
/* 36 */     setAlwaysOnTop(true);
/* 37 */     moveToCenter();
/*    */   }
/*    */ 
/*    */   private void moveToCenter()
/*    */   {
/* 42 */     Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
/* 43 */     setLocation((screen.width - getWidth()) / 2, (screen.height - getHeight()) / 2);
/*    */   }
/*    */ 
/*    */   public static void showDemo() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException
/*    */   {
/* 48 */     if (app == null)
/* 49 */       app = new Demo();
/* 50 */     app.setVisible(true);
/* 51 */     SwingUtilities.invokeLater(new Runnable()
/*    */     {
/*    */       public void run() {
/* 54 */         Demo.app.pack();
/*    */       }
/*    */     });
/*    */   }
/*    */ }

/* Location:           F:\16 2\SQ.jar
 * Qualified Name:     com.ui.Demo
 * JD-Core Version:    0.6.0
 */